#pragma once 
#include <unordered_map>
#include <google/protobuf/service.h>
#include <memory>
#include "rpcService.h"
#include "tinyrpc/net/coroutine_sync.h"
namespace TinyRPC {

// 这是针对客户端的RPCService信息类
struct RPCServiceInfo{
    google::protobuf::Service* m_service;
    std::unordered_map<std::string, const google::protobuf::MethodDescriptor*> m_methodMap;
    std::unordered_map<std::string, RPCServicePtr> m_services;
    std::unordered_map<std::string, RPCServicePtr>::iterator idx = m_services.end();
    CoLock m_lock;
};

using RPCServiceInfoPtr = std::shared_ptr<RPCServiceInfo>;

}